package com.rmt.www.action;

import java.util.List;
import org.apache.struts2.ServletActionContext;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.rmt.www.dao.ArtifactDao;
import com.rmt.www.dao.ProjectDao;
import com.rmt.www.dao.RequestDao;
import com.rmt.www.dao.UserDao;
import com.rmt.www.service.SREManageFeatureService;
import com.rmt.www.utility.SystemTime;
import com.rmt.www.vo.Artifact;
import com.rmt.www.vo.Project;
import com.rmt.www.vo.Request;
import com.rmt.www.vo.User;


public class DeleteFeatureAction extends ActionSupport{
	private List<String> aid;
	private SREManageFeatureService SREManageFeatureService;
	
	public SREManageFeatureService getSREManageFeatureService() {
		return SREManageFeatureService;
	}


	public void setSREManageFeatureService(
			SREManageFeatureService sREManageFeatureService) {
		SREManageFeatureService = sREManageFeatureService;
	}


	public List<String> getAid() {
		return aid;
	}


	public void setAid(List<String> aid) {
		this.aid = aid;
	}

	public void deleteFeature(){
		int id;
		String tmp;
		for(int i=0;i<aid.size();i++){
			tmp=aid.get(i).trim();
		 	id=Integer.parseInt(tmp);
		 	SREManageFeatureService.deleteFeature(id);
		}
	}
	/*
	public String execute(){
		int id;
		for(int i=0;i<pid.size();i++){
			id=Integer.parseInt(pid.get(i));
			projectDao.deleteProject(id);
		}
		return "success";
	}
	*/
}
